#include "imageprocessor.h"

void BinMatrix(uchar*src1,uchar*src2,uchar*dest,int size,BinMatrixOperation op)
{
    for(int i =0;i<size;i++)
    {
        op(&dest[i],&src1[i],&src2[i]);
    }
}

void BinAddOperation(uchar*dest,uchar*src1,uchar* src2)
{
    if(*src1  | *src2)
        *dest = 1;
    else
        *dest = 0;

}

void BinMinusOperation(uchar*dest,uchar*src1,uchar* src2)
{
    if(*src1 && !*src2)
    {
        *dest = 1;
    }
    else *dest = 0;
}
